home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-11-03 | 6.2 KB | 261 lines | [TEXT/MPS ] |
- #
- # This MPW script builds the DTS Sample CSAM.
- # Copyright © 1992-93, Apple Computer Inc. All Rights Reserved.
- #
- # A full build takes about 20 minutes on a Mac-IIci using
- # virtual memory.
- #
- # (<CMD>/B: DTSSampleCSAM)
- #
- # Definitions
- # Src C and assembler sources
- # Obj Object files
- # If you modify Audit.c and/or Audit.h, be sure to copy the
- # current sources into the {Src} folder.
- #
- DestinationVolume = `volumes "{Target}"`
- Src = ":Src:"
- Obj = ":Obj:"
-
- #
- # These definitions duplicate definitions in DTSSampleCSAM.h
- #
- # kDriverCodeFile The location of the driver code resource
- # file in the source build directory tree
- # kTemplateCodeFile The location of the template code resource
- # file in the source build directory tree
- # kIconResourceFile The location of the icon "source" file
- # kCSAMCreatorID The registered creator id
- #
- # Grr: don't put spaces in the following: MPW will win out.
- #
- kDriverCodeFile = "{Obj}DTSSampleDRVR.code"
- kTemplateCodeFile = "{Obj}DTSSampleTemplate.code"
- kIconResourceFile = "DTSSampleIcons"
- kCSAMOutputFile = "DTSSampleCSAM"
- kCSAMCreatorID = 'Pdsm'
- #
- # This is for debugging
- #
- kThinkCSAMOutputFile = "DTSSampleCSAM_Think"
- #
- # Define the Rez source files
- #
- kCSAMResourceFiles = ∂
- {Src}DTSSampleCSAM.r ∂
- {Src}DTSSampleCSAMDriver.r ∂
- {Src}DTSSampleCSAMTemplate.r
-
- #
- # Compiler definitions
- #
- COptions = -b2 -mbg full -trace never -r ∂
- -d "kCSAMCreatorID={kCSAMCreatorID}"
- AOptions = -wb
-
- #
- # Directory dependencies. "Everything in the
- # {Obj} directory depends on something in the
- # {Src} directory."
- #
- {Obj} ƒ {Src}
-
- #
- # Compiler dependencies -- common to all compilations
- # The idea here is that all sources are stored in
- # the {Src} subdirectory, and all objects (and code
- # resources output by the linker) are stored in the
- # {Obj} subdirectory. Also, all C source files depend
- # on the DTSSampleCSAM.h header file, while all ASM
- # source files depend on DriverGlue.incl.a.
- #
- .c.o ƒ .c ∂
- {Src}DETUtilities.h ∂
- {Src}Audit.h ∂
- {Src}DTSSampleCSAM.h
- C {COptions} ∂
- -o {TargDir}{Default}.c.o ∂
- {DepDir}{Default}.c
-
- .a.o ƒ .a {Src}DriverGlue.incl.a
- {Asm} {AOptions} ∂
- -o {Obj}{Default}.a.o ∂
- {Src}{Default}.a
-
- #
- # This command builds the CSAM
- #
- CSAM ƒ ∂
- {kCSAMOutputFile}
- Echo "Done"
-
- #
- # Create the CSAM by combining the code files
- # with the various resources.
- #
- "{kCSAMOutputFile}" ƒ ∂
- MakeFile ∂
- "{kIconResourceFile}" ∂
- "{kDriverCodeFile}" ∂
- "{kTemplateCodeFile}" ∂
- {kCSAMResourceFiles}
- Rez -c {kCSAMCreatorID} ∂
- -t 'dash' ∂
- -i "{CIncludes}" ∂
- -i "{Obj}" ∂
- -rd ∂
- -d "kCSAMCreatorID={kCSAMCreatorID}" ∂
- -d "Think_Rez=0" ∂
- -o "{kCSAMOutputFile}" ∂
- {Src}DTSSampleCSAM.r
- SetFile -a SBi ∂
- -c {kCSAMCreatorID} ∂
- -t 'dash' ∂
- "{kCSAMOutputFile}"
-
- #
- # This is for debugging. The following commands
- # decompile (somewhat) the CSAM's built with
- # MPW and/or Think, then compare the two. They
- # are not very useful.
- #
- "{kCSAMOutputFile}.Derez" ƒ ∂
- "{kCSAMOutputFile}" ∂
- MakeFile
- DeRez {kCSAMOutputFile} ∂
- -s 'icl8' -s 'ics8' -s 'icl4' ∂
- -s 'ics4' -s 'SICN' -s 'ICN#' ∂
- -s 'ics#' -s 'BNDL' -s 'FREF' ∂
- -s 'detc' -s 'DRVR' ∂
- "{RIncludes}OCE.r" ∂
- "{RIncludes}Types.r" ∂
- -i "{RIncludes}" ∂
- -i "{CIncludes}" ∂
- > "{kCSAMOutputFile}.Derez"
-
- "{kThinkCSAMOutputFile}.Derez" ƒ ∂
- "{kThinkCSAMOutputFile}" ∂
- MakeFile
- DeRez "{kThinkCSAMResourceFile}" ∂
- -s 'icl8' -s 'ics8' -s 'icl4' ∂
- -s 'ics4' -s 'SICN' -s 'ICN#' ∂
- -s 'ics#' -s 'BNDL' -s 'FREF' ∂
- -s 'detc' -s 'DRVR' ∂
- {RIncludes}OCE.r ∂
- {RIncludes}Types.r ∂
- -i {RIncludes} ∂
- -i {CIncludes} ∂
- > "{kThinkCSAMOutputFile}.Derez"
-
- CSAM.Diff ƒ ∂
- "{kCSAMOutputFile}.Derez" ∂
- "{kThinkCSAMOutputFile}.Derez"
- Compare ∂
- "{kCSAMOutputFile}.Derez" ∂
- "{kThinkCSAMOutputFile}.Derez" ∂
- > CSAM.Diff
-
- #
- # This checks that the two CSAM variants have
- # the same set of resources. There will be a
- # few length differences as the info resource
- # and code resources are, indeed, different.
- #
- CSAM.ResEqualDiff ƒ ∂
- "{kCSAMOutputFile}" ∂
- "{kThinkCSAMOutputFile}"
- ResEqual ∂
- "{kCSAMOutputFile}" ∂
- "{kThinkCSAMOutputFile}" ∂
- > CSAM.ResEqualDiff
-
-
- #
- # Print out all source code
- #
- Print ƒ ∂
- "{kCSAMOutputFile}"
- Print -font Courier ∂
- -h ∂
- -size 9 ∂
- -tabs 4 ∂
- MakeFile ∂
- {Src}≈.h ∂
- {Src}≈.c ∂
- {Src}≈.r
-
- #
- # The CSAM driver code resource. Note that
- # MPW's DRVRRuntime.o is not used.
- # MPWDriverGlue.a.o must be first
- #
- DriverObjects = ∂
- {Obj}MPWDriverGlue.a.o ∂
- {Obj}AddCatalog.c.o ∂
- {Obj}Audit.c.o ∂
- {Obj}AuditLibrary.c.o ∂
- {Obj}Callbacks.c.o ∂
- {Obj}CSAM_DSParseProc.c.o ∂
- {Obj}CSAM_DSProc.c.o ∂
- {Obj}DirectoryInterface.c.o ∂
- {Obj}DirParseCommon.c.o ∂
- {Obj}DTSSampleCSAM.c.o ∂
- {Obj}GetCSAMIcon.c.o ∂
- {Obj}GetPABFSSpecCB.c.o ∂
- {Obj}GetRefNumFromRLI.c.o ∂
- {Obj}MPWCallCompletion.a.o ∂
- {Obj}ProcessPDCommands.c.o ∂
- {Obj}RemoveCatalog.c.o
-
- "{kDriverCodeFile}" ƒ ∂
- MakeFile ∂
- {DriverObjects}
- Link {SymOptions} ∂
- -sg SampleCSAM ∂
- -m main ∂
- -ra SampleCSAM=resSysHeap,resLocked,resPreload ∂
- -rt DRVW=0 ∂
- -o "{kDriverCodeFile}" ∂
- {DriverObjects} ∂
- "{Libraries}Interface.o"
- SetFile -t rsrc -c 'RSED' {kDriverCodeFile}
-
- #
- # The DTS Sample CSAM Template code segment.
- # DTS_CSAMTemplate.c.o must be first as O.C.E.
- # jumps to the start of the module.
- #
- TemplateObjects = ∂
- {Obj}DTS_CSAMTemplate.c.o ∂
- {Obj}Audit.c.o ∂
- {Obj}DETUtilities.c.o
-
- "{kTemplateCodeFile}" ƒ ∂
- MakeFile ∂
- {TemplateObjects}
- Link {SymOptions} ∂
- -sg SampleDET ∂
- -m MAIN ∂
- -ra SampleDET=resSysHeap,resLocked,resPreload ∂
- -rt detc=0 ∂
- -o "{kTemplateCodeFile}" ∂
- {TemplateObjects} ∂
- "{Libraries}Interface.o"
- SetFile -t rsrc -c 'RSED' "{kTemplateCodeFile}"
-
- #
- # This command reformats all source files
- #
- ReformatSource ƒ
- {Src}DTSSampleCSAM.h
- for foo in {Src}≈
- echo {foo}
- open {foo}
- format -f Courier -s 10 {foo}
- close {foo}
- end
-
- #
- # End
- #
-